//
//  ZGSDangDiYouCell.m
//  Tour
//
//  Created by dllo on 15/10/29.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "ZGSDangDiYouCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation ZGSDangDiYouCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatView];
    }
    return self;
}

- (void)creatView{
    self.leftImage = [[UIImageView alloc] init];
    [self.contentView addSubview:self.leftImage];
    [_leftImage release];
    self.labelTitle = [[UILabel alloc] init];
    [self.contentView addSubview:self.labelTitle];
    [_labelTitle release];
    self.labelPrice = [[UILabel alloc] init];
    [self.contentView addSubview:self.labelPrice];
    [_labelPrice release];
    self.labelMoney = [[UILabel alloc] init];
    [self.contentView addSubview:self.labelMoney];
    [_labelMoney release];
    //    self.contentView.frame.size.height
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.leftImage.frame = CGRectMake(5, 10, WIDTH / 4 , HEIGHT - 20);
    //    self.leftImage.layer.borderWidth = 1;
    self.labelTitle.frame = CGRectMake(WIDTH / 4 + 10, 10, WIDTH / 4 * 3 - 20, HEIGHT / 2 - 20);
    //    self.labelTitle.layer.borderWidth = 1;
    self.labelTitle.numberOfLines = 2;
    self.labelPrice.frame = CGRectMake(WIDTH / 4 + 10, HEIGHT / 2 - 20 + 50, 50, 20);
    self.labelPrice.tintColor = [UIColor grayColor];
    self.labelPrice.font = [UIFont systemFontOfSize:11];
    //    self.labelPrice.layer.borderWidth = 1;
    self.labelMoney.frame = CGRectMake(WIDTH - 120, HEIGHT / 2 - 20 + 50, 100, 20);
    //    self.labelMoney.layer.borderWidth = 1;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
